import { handleActions } from 'redux-actions'
import { UPDATEBASEUSERINFO } from '../types/baseuserinfo'

const Schema = {
  userInfoC: {
    name: '',
    birthday: '',
    gender: 'male',
    intro: '',
    mobile: '',
    jobIntention: [],
    archiveId: ''
  },
  userInfoB: {
    name: '',
    birthday: '',
    gender: 'male',
    position: ''
  }
}

export default handleActions(
  {
    [UPDATEBASEUSERINFO](state, action) {
      let newState = {
        ...state,
        ...action.payload
      }
      return {
        ...newState
      }
    }
  },
  Schema
)
